package com.ruoyi.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.domain.ExSafetySystemManagement;
import com.ruoyi.mapper.ExSafetySystemManagementMapper;
import com.ruoyi.service.IExSafetySystemManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 实验室安全制度管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-02
 */
@Service
public class ExSafetySystemManagementServiceImpl implements IExSafetySystemManagementService
{
    @Autowired
    private ExSafetySystemManagementMapper exSafetySystemManagementMapper;

    /**
     * 查询实验室安全制度管理
     * 
     * @param id 实验室安全制度管理主键
     * @return 实验室安全制度管理
     */
    @Override
    public ExSafetySystemManagement selectExSafetySystemManagementById(Long id)
    {
        return exSafetySystemManagementMapper.selectExSafetySystemManagementById(id);
    }

    /**
     * 查询实验室安全制度管理列表
     * 
     * @param exSafetySystemManagement 实验室安全制度管理
     * @return 实验室安全制度管理
     */
    @Override
    public List<ExSafetySystemManagement> selectExSafetySystemManagementList(ExSafetySystemManagement exSafetySystemManagement)
    {
        return exSafetySystemManagementMapper.selectExSafetySystemManagementList(exSafetySystemManagement);
    }

    /**
     * 新增实验室安全制度管理
     * 
     * @param exSafetySystemManagement 实验室安全制度管理
     * @return 结果
     */
    @Override
    public int insertExSafetySystemManagement(ExSafetySystemManagement exSafetySystemManagement)
    {
        exSafetySystemManagement.setCreateTime(DateUtils.getNowDate());
        return exSafetySystemManagementMapper.insertExSafetySystemManagement(exSafetySystemManagement);
    }

    /**
     * 修改实验室安全制度管理
     * 
     * @param exSafetySystemManagement 实验室安全制度管理
     * @return 结果
     */
    @Override
    public int updateExSafetySystemManagement(ExSafetySystemManagement exSafetySystemManagement)
    {
        return exSafetySystemManagementMapper.updateExSafetySystemManagement(exSafetySystemManagement);
    }

    /**
     * 批量删除实验室安全制度管理
     * 
     * @param ids 需要删除的实验室安全制度管理主键
     * @return 结果
     */
    @Override
    public int deleteExSafetySystemManagementByIds(Long[] ids)
    {
        return exSafetySystemManagementMapper.deleteExSafetySystemManagementByIds(ids);
    }

    /**
     * 删除实验室安全制度管理信息
     * 
     * @param id 实验室安全制度管理主键
     * @return 结果
     */
    @Override
    public int deleteExSafetySystemManagementById(Long id)
    {
        return exSafetySystemManagementMapper.deleteExSafetySystemManagementById(id);
    }
}
